package com.wxp.controller.mall;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wxp.controller.BaseController;
import com.wxp.service.ConstructionService;
import com.wxp.service.MaterialService;
import com.wxp.util.IData;

@Controller
@RequestMapping(value = "/material")
public class MaterialController extends BaseController {
	
	@Autowired
	private MaterialService materialService;

	@RequestMapping(value = "/fetchStatisticDate")
	@ResponseBody
	public Object fetchStatisticDate() throws Exception {
		IData pd = IData.getInstance(request);
		
		List<IData> datas = materialService.fetchStatisticDate(pd);
		
		return datas;
	}
	
	@RequestMapping(value = "/fetchMaterial")
	@ResponseBody
	public Object fetchMaterial() throws Exception {
		IData pd = IData.getInstance(request);
		
		List<IData> datas = materialService.fetchMaterial(pd);
		
		return datas;
	}
	
}
